Skip to content

Conversation

@codefromlani
Copy link
Contributor

@codefromlani codefromlani commented Oct 6, 2025

Part of #38

This PR adds the Paystack adapter for EasySwitch, implementing full support for:

  • Payment initialization (send_payment)
  • Transaction status checks (check_status)
  • Refund processing (refund)
  • Webhook validation and parsing (validate_webhook, parse_webhook)
  • Transaction detail retrieval (get_transaction_detail)
  • Proper handling for unsupported operations (e.g., cancel_transaction)

Additionally, unit tests are included to cover:

  • Webhook signature validation
  • Payment initialization
  • Transaction status retrieval
  • Cancellation error handling

All tests pass and the adapter is fully compatible with EasySwitch’s transaction validation and type system.

Tests:

Screenshot 2025-10-06 145857

@codefromlani
Copy link
Contributor Author

@Einswilli
Implemented all suggested changes, parse_webhook now returns WebhookEvent, send_payment uses format_transaction, get_transaction_detail returns TransactionDetail, and get_normalize_status has been added for Paystack status mapping

Copy link
Collaborator

@Einswilli Einswilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, Great Work!
Can we have a full usage example with detailed explanation for the doc under docs/assets/examples/paystack.md??? (maybe in a new PR)

@Einswilli Einswilli merged commit d74e861 into AllDotPy:master Oct 6, 2025
1 check passed
@codefromlani
Copy link
Contributor Author

First of all, Great Work! Can we have a full usage example with detailed explanation for the doc under docs/assets/examples/paystack.md??? (maybe in a new PR)

Thanks. Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants